{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6a83a14c-3742-4843-b55e-72223b85bb6f",
   "metadata": {},
   "source": [
    "# Splitting on the Best Scores & Discrete Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "03ea703b-132e-42fb-a516-c15fbd69c000",
   "metadata": {},
   "outputs": [],
   "source": [
    "%run Coding_Gini_Entropy_MSE.ipynb\n",
    "import _plotting\n",
    "# Allows us to use the functions we wrote\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy\n",
    "import pandas\n",
    "import sklearn.tree"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7d678464-12cc-4c14-8f6d-b01e49b67f87",
   "metadata": {},
   "source": [
    "#### We can use the Gini and Entropy to decide when the best split is for a given set of elements. The higher the value, the better the split!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "1b5272b5-054a-4aa0-9a15-bf5f648204a7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3, 2, 1]\n",
      "0.6111111111111112\n",
      "1.4591479170272448\n",
      "**********\n",
      "[] ['A', 'A', 'A', 'C', 'B', 'C']\n",
      "Weighted Gini: 0.6111111111111112\n",
      "Weighted Entropy: 1.4591479170272446\n",
      "**********\n",
      "['A'] ['A', 'A', 'C', 'B', 'C']\n",
      "Weighted Gini: 0.5333333333333333\n",
      "Weighted Entropy: 1.268273412406135\n",
      "**********\n",
      "['A', 'A'] ['A', 'C', 'B', 'C']\n",
      "Weighted Gini: 0.41666666666666663\n",
      "Weighted Entropy: 1.0\n",
      "**********\n",
      "['A', 'A', 'A'] ['C', 'B', 'C']\n",
      "Weighted Gini: 0.2222222222222222\n",
      "Weighted Entropy: 0.4591479170272448\n",
      "**********\n",
      "['A', 'A', 'A', 'C'] ['B', 'C']\n",
      "Weighted Gini: 0.41666666666666663\n",
      "Weighted Entropy: 0.8741854163060886\n",
      "**********\n",
      "['A', 'A', 'A', 'C', 'B'] ['C']\n",
      "Weighted Gini: 0.4666666666666667\n",
      "Weighted Entropy: 1.1424588287122237\n"
     ]
    }
   ],
   "source": [
    "elements = ['A', 'A', 'A', 'C', 'B', 'C']\n",
    "\n",
    "print(list(construct_dict_count(elements).values()))\n",
    "print(calculate_gini(elements))\n",
    "print(calculate_entropy(elements))\n",
    "\n",
    "for i in range(len(elements)):\n",
    "    print(\"*\"*10)\n",
    "    # Split list in two at each index\n",
    "    left = elements[:i]\n",
    "    right = elements[i:]\n",
    "    print(left, right)\n",
    "    weighted_gini = calculate_weighted_auxillary(elements, i, calculate_gini)\n",
    "    print(\"Weighted Gini:\", weighted_gini)\n",
    "    weighted_entropy = calculate_weighted_auxillary(elements, i, calculate_entropy)\n",
    "    print(\"Weighted Entropy:\", weighted_entropy)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "16f168fa-20be-4f87-8791-52bd39157acf",
   "metadata": {},
   "source": [
    "## A Regression dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d1614f81-36b4-4168-9ddd-7ae6755de1ed",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEGCAYAAABvtY4XAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAVFklEQVR4nO3dfZBdd33f8feHtQyLTRDGC7VkHGFIl6EQW3jr2JhhCIQIWsZVwTO1J6FuhtZ06iZAGWVQaGndDs0QZcAU2jTiKeUhJMEINfVQFNchMJDGZGUZ5KeNDTbYa4PXocKAd2xZ/vaPe9ashLS6+3B27z16v2Z2dO+5957z0Z1zP3v2d89DqgpJUvc8aa0DSJLaYcFLUkdZ8JLUURa8JHWUBS9JHXXSWgeY7/TTT69NmzatdQxJGhp79+59sKrGjvbYQBX8pk2bmJycXOsYkjQ0knz7WI85R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lAUvSR1lwUtSR1nwktRRFrwEJNmapJIM5JG70lJY8FLPZcBXmn+lTrDgdcJrzhP0MnoHzF3aTHtSkv/WnAv9uiSfT3JJ89h5Sb7UnDRsz9zh8NKgseCl3omfvlBVfwP8bZLzgNfTOyX1C4E30jsnz9x5hT4AXFJV5wEfBd69FqGl4znp+E+ROu8yeicqg96Jyy6j99n4TFU9Dnw3yRebx8eBFwHX9U4jwgi902ZIA8eC1wktyWn0zkT54iRFr7CL3tkej/oS4JaqunCVIkpL5hCNTnSXAJ+oqp+tqk1V9Rx6VzL6PvCGZiz+2fROaAa9qwSNJXliyCbJ31uL4NLxWPA60V3GT2+tfxb4O/TOVHor8El6ly/8QVU9Su+XwnuSfJ3e2UFfumpppUXwbJLSMSQ5tap+lOSZ9E7jelH1zpMuDQXH4KVju7a5AMrJwH+y3DVs3IKXpI5yDF6SOsqCl6SOsuAlqaMseEnqKAtekjrq/wN9aQEZQfnWSQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "features = list(range(10, 80+1, 10))\n",
    "features = numpy.array(features).reshape(-1,1) # [[10], [20], ...]\n",
    "labels = numpy.array([7,5,7,1,2,1,5,4])\n",
    "\n",
    "_plotting.plot_scatter(features, labels, x_label=\"Age\", y_label=\"Days Per Week\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f3ee819c-e4ff-4d59-a966-1ff403cc0ffe",
   "metadata": {},
   "source": [
    "## Let's try splitting the data ourselves\n",
    "\n",
    "#### We'll split the label data at the 6th index, then calculate the MSE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "14bca242-9458-42f1-acd6-5b736336503b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Split: [7 5 7 1 2 1] [5 4]\n",
      "5.16666675\n",
      "MSE score: 5.166666666666667\n"
     ]
    }
   ],
   "source": [
    "print(\"Split:\", labels[:6], labels[6:])\n",
    "\n",
    "x_ = 1/8*(\n",
    "    (7-3.833)**2 +\n",
    "    (5-3.833)**2 +\n",
    "    (7-3.833)**2 +\n",
    "    (1-3.833)**2 +\n",
    "    (2-3.833)**2 +\n",
    "    (1-3.833)**2 +\n",
    "    (5-4.5)**2 +\n",
    "    (4-4.5)**2)\n",
    "print(x_)\n",
    "\n",
    "# Checking our work\n",
    "print(\"MSE score:\", calculate_mse(labels, 6, numpy.mean))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "25427780-e456-468f-b8a1-205870a922f8",
   "metadata": {},
   "source": [
    "## Finding the first split by mimizing the MSE\n",
    "\n",
    "#### Remember, the higher the score, the better the split! But if there's no split, then we should probably continue to find one."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "5228b72e-568f-4812-b225-ad0afbc5a5a8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "**********\n",
      "[] [7 5 7 1 2 1 5 4]\n",
      "nan 4.0\n",
      "Weighted Standard (MSE): 5.25\n",
      "**********\n",
      "[7] [5 7 1 2 1 5 4]\n",
      "7.0 3.5714285714285716\n",
      "Weighted Standard (MSE): 3.9642857142857144\n",
      "**********\n",
      "[7 5] [7 1 2 1 5 4]\n",
      "6.0 3.3333333333333335\n",
      "Weighted Standard (MSE): 3.916666666666667\n",
      "**********\n",
      "[7 5 7] [1 2 1 5 4]\n",
      "6.333333333333333 2.6\n",
      "Weighted Standard (MSE): 1.9833333333333334\n",
      "**********\n",
      "[7 5 7 1] [2 1 5 4]\n",
      "5.0 3.0\n",
      "Weighted Standard (MSE): 4.25\n",
      "**********\n",
      "[7 5 7 1 2] [1 5 4]\n",
      "4.4 3.3333333333333335\n",
      "Weighted Standard (MSE): 4.983333333333333\n",
      "**********\n",
      "[7 5 7 1 2 1] [5 4]\n",
      "3.8333333333333335 4.5\n",
      "Weighted Standard (MSE): 5.166666666666667\n",
      "**********\n",
      "[7 5 7 1 2 1 5] [4]\n",
      "4.0 4.0\n",
      "Weighted Standard (MSE): 5.25\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Diego\\miniconda3\\lib\\site-packages\\numpy\\core\\fromnumeric.py:3440: RuntimeWarning: Mean of empty slice.\n",
      "  return _methods._mean(a, axis=axis, dtype=dtype,\n",
      "C:\\Users\\Diego\\miniconda3\\lib\\site-packages\\numpy\\core\\_methods.py:189: RuntimeWarning: invalid value encountered in double_scalars\n",
      "  ret = ret.dtype.type(ret / rcount)\n"
     ]
    }
   ],
   "source": [
    "best_mse = float('-inf')\n",
    "best_index = None\n",
    "for i in range(len(labels)):\n",
    "    left = labels[:i]\n",
    "    right = labels[i:]\n",
    "    print(\"*\"*10)\n",
    "    print(left, right)\n",
    "    print(numpy.mean(left), numpy.mean(right))\n",
    "    weighted_standard = calculate_weighted_something(labels, i, subtract_mean)\n",
    "    print(\"Weighted Standard (MSE):\", weighted_standard)\n",
    "    if best_mse <= weighted_standard: # Continue to find one\n",
    "        best_mse = weighted_standard\n",
    "        best_index = i"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a45cdc17-2518-4916-b22a-81209f2001ac",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Best calculated MSE: 5.25\n",
      "Calculate MSE (at best index): 5.25\n"
     ]
    }
   ],
   "source": [
    "print(\"Best calculated MSE:\", best_mse)\n",
    "print(\"Calculate MSE (at best index):\", calculate_mse(labels, best_index, numpy.mean))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8543f90f-3c4f-4435-af9f-23809f4550b3",
   "metadata": {},
   "source": [
    "# Decision trees for Regression\n",
    "### Remember, regression finds a best fit line (plane). But decision trees will help us find a best-fit discrete line (plane)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "22af6592-2270-4f33-b2e0-a10e8b5cd398",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DecisionTreeRegressor(max_depth=2)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_regressor = sklearn.tree.DecisionTreeRegressor(max_depth=2)\n",
    "model_regressor.fit(features, labels)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e6477bf5-ebee-4579-93b7-7605c6ad9ed3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Text(0.5, 0.8333333333333334, 'Age <= 35.0\\nsquared_error = 5.25\\nsamples = 8\\nvalue = 4.0'),\n",
       " Text(0.25, 0.5, 'Age <= 15.0\\nsquared_error = 0.889\\nsamples = 3\\nvalue = 6.333'),\n",
       " Text(0.125, 0.16666666666666666, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
       " Text(0.375, 0.16666666666666666, 'squared_error = 1.0\\nsamples = 2\\nvalue = 6.0'),\n",
       " Text(0.75, 0.5, 'Age <= 65.0\\nsquared_error = 2.64\\nsamples = 5\\nvalue = 2.6'),\n",
       " Text(0.625, 0.16666666666666666, 'squared_error = 0.222\\nsamples = 3\\nvalue = 1.333'),\n",
       " Text(0.875, 0.16666666666666666, 'squared_error = 0.25\\nsamples = 2\\nvalue = 4.5')]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADnCAYAAAC9roUQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAABOgElEQVR4nO3dd3wUVdfA8d/dlmx6Qi+h996R3gSkKEgTEVGqVBGpgqAIYgUsSFGRrggPHRQRKdKLQOglhNASanrdZPc+f2xYSEgggSSbcr+fD+/zZufunbPj7tnZmTNnhJQSR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cFoNOjUxkzCIiVH/e7F7jkf6BcRG/+ClDLswTIhRGFnZ+ejPXr0yFuxYkW9ei+mnZSSgwcPxm7bts0/IiKivpQyVAhR0eigP/BWuwYuRfJ6qNsCp0JUrEku2LAnOiwyekRcvPmpzRzSlHQBhBClhaCXg1aTO3orppHJbAm2SNZKKU8+fTQIIV7UaUQrnVaTtQ9+2oeMiTNfBxZKKUOSLhRCFBZC9HFwcCgoVNZNMymljImJuYF1+wY/eFwIUU4I0dNBr8tjx/CyjXizOSrebNklpfzr6aOfIekqiqIozy7r1pooiqLkQCrpKoqiZCKVdBVFUTKRSrqKoiiZSCVdRVGUTKSSrqIoSiZSSVdRFCUTqaSrKIqSiVTSVRRFyUQq6SqKomQilXQVRVEykUq6iqIomUglXUVRlEykkq6iKEomUklXURQlE6mkqyiKkolU0lUURclEKukqiqJkIpV0FUVRMpFKuoqiKJlIJV1FUZRMpJKuoihKJlJJV1EUJROppKsoipKJVNJVFEXJRCrpKoqiZCKVdBVFUTKRSrqKoiiZSCVdRVGUTPR/G1iBxVwwmegAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sklearn.tree.plot_tree(model_regressor, feature_names=[\"Age\"], filled=True, rounded=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "4da127c2-ef01-4d0a-81f7-3dc158fad7cc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEGCAYAAABvtY4XAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAYmklEQVR4nO3dfZBddX3H8fcnm0UXsG6BlZJADEpZx2IxuFUxSClKA5XBqKmSqrWONdqxVh1dax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kqS8AL0h+fgHwn3nXVrSI2BoRJ0bEWhrHytci4rnAVcCm5GUduW8AIuIO4OeS+pNFTwFuxMdO08+AJ0o6Mvk9a+6f0h4/lb+SVdKf0OhX7QI+GhFvL7aiYkk6C/gWsJvZfubX0+iH/yywhsaUzM+OiF8WUmQJSDoHeE1EXCjpETRa9McAI8DzIuL+AssrjKTH0jgBfQRwC/BCGg1BHzuApLcAz6ExWm0E+Esafe6lPH4qH/BmZja3qnfRmJnZPBzwZmY15YA3M6spB7yZWU054M3MasoBbwZI2igpJD2q6FrMlosD3qxhM3B18l+zWnDAW8dL5u05i8Y0rxcny1ZI+udkXvQrJH1J0qbkucdJ+oakXZKGmpfxm5WNA96sMYHUVyLih8AvJD0OeCawlsZ9Bp4PnAkz8/y8H9gUEY8DPgp09NXTVl4r27/ErPY205h0DBqXnG+m8bvxuYg4CNwh6ark+X7gNOCKxnQkdNGYOtasdBzw1tEkHUNjVsnHSAoagR3A5fO9BbghIs7MqUSzRXMXjXW6TcB/RMTDI2JtRJwE3Ar8EnhW0hd/PHBO8vpRoE/STJeNpN8ronCzdhzw1uk285ut9c8Dv0NjfvQbgU8A1wG/Tm4NuQl4p6TvAtcDT8qtWrMF8GySZvOQdHRE3CPpWOBaYH0yZ7pZJbgP3mx+X5TUS2Nu9Lc53K1q3II3M6sp98GbmdWUA97MrKYc8GZmNeWANzOrKQe8mVlN/T+y+b3dGyrweQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Our usual function won't work since we have one-dimensional features\n",
    "def plot_regressor(model, features, labels):\n",
    "    x = numpy.linspace(0,85,1000)\n",
    "    plt.scatter(features, labels)\n",
    "    plt.plot(x, model.predict(x.reshape([-1,1])))\n",
    "    plt.xlabel(\"Age\")\n",
    "    plt.ylabel(\"Days per week\")\n",
    "\n",
    "plot_regressor(model_regressor, features, labels)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
